﻿// See https://aka.ms/new-console-template for more information
using ImageMagick;
Console.WriteLine("请输入需要转换的文件路径");
string Path = Console.ReadLine();
string[] allfiles = Directory.GetFiles(Path, "*.heic", SearchOption.AllDirectories);
foreach (var file in allfiles)
{
    try
    {
        FileInfo info = new FileInfo(file);
        using (MagickImage image = new MagickImage(info.FullName))
        {
            image.Write(info.FullName + ".jpg");
        }
    }
    catch 
    { }
}

Console.ReadKey();